package com.fand.manager.controller;

import java.util.List;

import javax.annotation.Resource;

import com.fand.common.util.PageResult;
import com.fand.manager.model.login.SysUserLoginRecordSearchDTO;
import com.fand.manager.service.ISysUserLoginRecordService;
import com.fand.stater.model.es.SysUserESIndexRecord;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Author: zhangjiabin
 * Email: javaboyok@163.com
 * CreateDate: 2021/6/27
 * Version: 1.0
 */
@Api(tags = "登录记录")
@RestController
@RequestMapping(("/sys-login"))
public class SysUserLoginRecordController {

    @Resource
    private ISysUserLoginRecordService sysUserLoginRecordService;

    @ApiOperation("所有登录记录")
    @GetMapping("/list")
    public PageResult<List<SysUserESIndexRecord>> list(SysUserLoginRecordSearchDTO sysUserLoginRecordSearchDTO){
        return sysUserLoginRecordService.list(sysUserLoginRecordSearchDTO.builder());
    }
}
